package com.tony.concurrent.BlockQueneTest;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

public class BlockQuene {
    public static void main(String[] args) {
        BlockingQueue blockingQueue = new ArrayBlockingQueue(256);
        Producer producer = new Producer(blockingQueue);
        Consumer consumer = new Consumer(blockingQueue);

        new Thread(producer).start();
        new Thread(consumer).start();

    }
}
